﻿<SettingsFlyout
    x:Class="PuzzleModern.ParamsFlyout"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="Custom game" 
    IconSource="Assets/SmallLogo.scale-100.png" 
    HeaderForeground="White" 
    HeaderBackground="DarkGreen"
    Background="LightGray"
    mc:Ignorable="d">
    <!-- TODO: This should not be a flyout, but its own Page. -->
    <SettingsFlyout.Resources>
        <DataTemplate x:Name="LabelTemplate">
            <TextBlock Text="{Binding}" TextWrapping="Wrap"/>
        </DataTemplate>

        <Storyboard x:Name="ErrorAppearingStoryboard">
            <ColorAnimation
                    EnableDependentAnimation="true"
                    Storyboard.TargetName="ErrorLabel"
                    Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
                    Duration="0:0:1"
                    From="Red"
                    To="DarkRed"
                    />
        </Storyboard>

    </SettingsFlyout.Resources>

    <StackPanel Width="260">
        <StackPanel
            x:Name="ItemsPanel">
        </StackPanel>
        <TextBlock x:Name="ErrorLabel" FontSize="20" Foreground="Red" FontWeight="Bold" TextWrapping="Wrap" Margin="0,30,0,0" Visibility="Collapsed" />
        <TextBlock Text="This puzzle does not support custom parameters." x:Name="NoConfigLabel" TextWrapping="Wrap" FontSize="16" Visibility="Collapsed"/>
        <Button x:Name="ConfirmButton" Content="Apply" Click="ConfirmButton_Click" Margin="0,10,0,0" />
    </StackPanel>
</SettingsFlyout>